const router = require("express").Router();
const db = require("../../../database");
const sequelize = require("sequelize");
//更新数据表结构
router.post("/alter", async (req, res) => {
  await db.sync({ alter: true });
  res.send("ok");
});
//重建表
router.post("/force", async (req, res) => {
  await db.sync({ force: true });
  res.send("ok");
});
//删除表
router.post("/drop", async (req, res) => {
  await db.drop();
  res.send("ok");
});

module.exports = router;
